//
//  MyPromoteCell.m
//  NewPro
//
//  Created by 何荧红 on 2018/12/10.
//  Copyright © 2018 何荧红. All rights reserved.
//

#import "MyPromoteCell.h"

@interface MyPromoteCell ()
@property (nonatomic, strong) UILabel *namelab;
@property (nonatomic, strong) UILabel *submoneylab;

@end

@implementation MyPromoteCell

- (void)setInfodic:(NSDictionary *)infodic{
    _infodic = infodic;
    if (_infodic.count > 0) {
        self.namelab.text = [NSString stringWithFormat:@"合伙人姓名：%@",_infodic[@"customName"]];
        self.submoneylab.text = _infodic[@"dividedAmount"];
    }
}
- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
}
- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        self.backgroundColor = [UIColor clearColor];
        self.frame = CGRectMake(0, 0, SCREEN_WIDTH, 49);
        [self CleanSubView];
    }
    return self;
}
- (void)CleanSubView{
    UIView *frist = [[UIView alloc]initWithFrame:CGRectMake(0, 0, SCREEN_WIDTH, 44)];
    frist.backgroundColor = [UIColor whiteColor];
    [self addSubview:frist];
    self.namelab = [[UILabel alloc]init];
    self.namelab.font = [UIFont fontWithName:@"PingFang-SC-Medium" size:12];
    self.namelab.textColor = [UIColor colorWithHexString:@"333333"];
    [frist addSubview:self.namelab];
    [self.namelab mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.equalTo(frist.mas_left).offset(14);
        make.centerY.equalTo(frist.mas_centerY);
    }];
    self.submoneylab = [[UILabel alloc]init];
    self.submoneylab.font = [UIFont fontWithName:@"PingFang-SC-Medium" size:14];
    self.submoneylab.textColor = [UIColor colorWithHexString:@"0CA6F0"];
    [frist addSubview:self.submoneylab];
    [self.submoneylab mas_makeConstraints:^(MASConstraintMaker *make) {
        make.right.equalTo(frist.mas_right).offset(-14);
        make.centerY.equalTo(self.namelab.mas_centerY);
    }];
    UIView *sec = [[UIView alloc]initWithFrame:CGRectMake(0, 44, SCREEN_WIDTH, 5)];
    sec.backgroundColor = [UIColor clearColor];
    [self addSubview:sec];
}
- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];
}

@end
